package com.bestcem.xm.qdes.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bestcem.xm.component.mybatis.base.BaseEntity2;
import com.bestcem.xm.component.mybatis.format.String2JacksonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "ds_qdes_qstruct")
public class QdesQstruct extends BaseEntity2 {

    @TableId(value = "id")
    private String id;

    /**
     * 问卷ID
     */
    @TableField(value = "project_id")
    private String projectId;

    /**
     * 问卷版本号
     */
    @TableField(value = "version")
    private Integer version;

    /**
     * 版本发布时间
     */
    @TableField(value = "release_dt")
    private LocalDateTime releaseDt;

    /**
     * 结构数据
     */
    @TableField(value = "data")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String data;

    /**
     * 版本撤回时间
     */
    @TableField(value = "withdraw_dt")
    private LocalDateTime withdrawDt;

    /**
     * 题目模板
     */
    @TableField(value = "templates")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String templates;

    /**
     * 问卷附件
     */
    @TableField(value = "attachments")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String attachments;

    /**
     * 题目CSS模板
     */
    @TableField(value = "csses")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String csses;

    /**
     * 全局CSS文件
     */
    @TableField(value = "gcss")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String gcss;

    /**
     * 答题两个通用自定义css file，发布问卷复制文件
     */
    @TableField(value = "ucss")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String ucss;

    /**
     * 选项打分
     */
    @TableField(value = "scores")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String scores;

    /**
     * 签名密钥
     */
    @TableField(value = "secret_key")
    private String secretKey;

    /**
     * 隐私协议
     */
    @TableField(value = "policy")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String policy;

    /**
     * 问卷状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 得分规则
     */
    @TableField(value = "score_config")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String scoreConfig;

    /**
     * 全局JS文件
     */
    @TableField(value = "gjs")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String gjs;
}
